package com.hlddz.venue_reservation.service.impl;

import com.hlddz.venue_reservation.entity.Venue;
import com.hlddz.venue_reservation.mapper.VenueMapper;
import com.hlddz.venue_reservation.service.VenueService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author MoShang
 * @since 2024年05月31日
 */
@Service
public class VenueServiceImpl extends ServiceImpl<VenueMapper, Venue> implements VenueService {
    @Resource
    private VenueMapper venueMapper;

    @Override
    public List<Venue> getVenueListByType(String venueType) {
//        System.out.print(venueMapper.getVenueListByType(venueType));
        return venueMapper.getVenueListByType(venueType);
    }

    @Override
    public String getVenueNameByType(String venueType) {
        return venueMapper.getVenueNameByType(venueType);
    }
    @Override
    public void updateVenueRemain(Integer venueId) {
        venueMapper.updateVenueRemain(venueId);
    }

    @Override
    public Integer getVenueRemainById(Integer venueId) {
        return venueMapper.getVenueRemainById(venueId);
    }
}
